home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 72 / MOBICLIC 72.ISO / mac / DATA / TCHATCHE / doggy2004.cst / 00426_Script_426 < prev    next >
Text File  |  2005-02-02  |  2KB  |  75 lines

  1. -- gestion des rolls sur les boutons
  2.  
  3. property s, nom
  4. global laboActif,laboOK,laboH,laboV,pisteLabo,sonIntLangues,dernierSon
  5. global interLangues
  6.  
  7. on beginSprite me
  8.   s = me.SpriteNum
  9.   nom = sprite(s).member.name
  10.   if nom contains "Micro" then
  11.     pisteLabo = s
  12.     sprite(s).member = member("Micro2")
  13.   end if
  14.   if voidP(interlangues) then interfaceOn
  15. end
  16.  
  17. on MouseEnter me
  18.   -- conditions d'annulation du script ----------------------------
  19.   if _movie.pauseState() then exit
  20.   if interLangues=0 then exit
  21.   if laboActif=1 then exit
  22.   if sprite(s).member = member("Micro2") then exit
  23.   
  24.   _player.cursor(280)
  25.   sprite(s).member = nom & "_" & suffixeLangue() & "_1"
  26.   -- jouer le son correspondant au bouton si aucun son ne se joue
  27.   if sound(3).status = 3 then exit
  28.   if sonIntLangues = 0 then exit
  29.   LBout = ["Voc0","JeuVoc0","Dialog0","Jeu0","Son0","Micro0"]
  30.   p = getPos(LBout,nom)
  31.   if p<>0 then
  32.     nomSon = "bout" & string(p)
  33.     memSon = dernierSon
  34.     sound(4).volume = sound(3).volume
  35.     sound playFile(4, "@/sons_tchatche:" & nomSon & suffixeLangue())
  36.     dernierSon = memSon
  37.   end if
  38. end
  39.  
  40. on mouseLeave me
  41.   -- conditions d'annulation du script ----------------------------
  42.   if _movie.pauseState() then exit
  43.   if interLangues=0 then exit
  44.   if laboActif=1 then exit
  45.   if sprite(s).member = member("Micro2") then exit
  46.   
  47.   _player.cursor(-1)
  48.   sound(4).stop()
  49.   sprite(s).member = nom & "_" & suffixeLangue()
  50. end
  51.  
  52. on mouseUp me
  53.   -- conditions d'annulation du script ----------------------------
  54.   if laboActif=1 then exit
  55.   if interLangues=0 then exit
  56.   if sprite(s).member = member("Micro2") then exit
  57.   if sound(3).status = 3 and sprite(s).member.name contains "micro" then exit
  58.   if _mouse.mouseV<455 then exit
  59.   
  60.   -- actions valides ----------------------------------------------
  61.   boutonClic = nom.char[1..4]
  62.   case boutonClic of
  63.     "Voc0" : acces "tcha01"
  64.     "JeuV" : acces "tcha03"
  65.     "Dial" : acces "tcha02"
  66.     "Jeu0" : acces "tcha04"
  67.     "Micr" : -- gestion du micro
  68.       if laboOK = 1 then
  69.         sprite(pisteLabo).member = nom & "_" & suffixeLangue()
  70.         laboActif=1
  71.         _player.cursor(-1)
  72.         paletteLabo
  73.       end if
  74.   end case
  75. end